package com.lanyou.cook.entity.domain;

import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class DataDictionaryValueKey implements java.io.Serializable{

	@Column(name="LOOKUP_TYPE_CODE", length = 50)
	private String typeCode;
	
	@Column(name="LOOKUP_VALUE_CODE", length = 50)
	private String valueCode;
	
	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getValueCode() {
		return valueCode;
	}

	public void setValueCode(String valueCode) {
		this.valueCode = valueCode;
	}
	
	@Override
	public int hashCode() {
		return Objects.hash(typeCode,valueCode);
	}
	
	@Override
	public boolean equals(Object that) {
		if (that instanceof DataDictionaryValueKey) {
			DataDictionaryValueKey thatKey = (DataDictionaryValueKey) that;
			return Objects.equals(typeCode, thatKey.getTypeCode()) && Objects.equals(valueCode, thatKey.getTypeCode());
		}
		return false;
	}

}
